package com.example.servlet;

import com.example.service.BuyChanceService;
import com.example.utils.BaseServlet;
import com.example.utils.ResultData;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/buyChance")
public class BuyChanceServlet extends BaseServlet {
    BuyChanceService buyChanceService=new BuyChanceService();
    @Override
    public Class getChildClass() {
        return this.getClass();
    }
    public ResultData selectBuyRecord(HttpServletRequest request, HttpServletResponse response){
        int page = Integer.parseInt(request.getParameter("page"));
        int limit = Integer.parseInt(request.getParameter("limit"));
        return buyChanceService.selectAll(page,limit);
    }
    public ResultData addBuyChance(HttpServletRequest request,HttpServletResponse response){
        String bcTitle = request.getParameter("byTitle");
        String relationCus = request.getParameter("relationCus");
        String saleMoney = request.getParameter("money");
        String signDate = request.getParameter("date");
        String saleStage = request.getParameter("saleStage");
        String probability = request.getParameter("probability");
        String bcSource = request.getParameter("bySrc");
        return new ResultData();
    }
}
